package thread;

public class ThreadDemo1 {
    public static void main(String[] args) {
        MyThread1 m = new MyThread1();
        MyThread2 m_ = new MyThread2();

    }
    static class MyThread1 extends Thread {
        public void run() {
            for (int i = 0; i < 100; i++) {
                System.out.println("下课");
            }
        }
    }
    static class MyThread2 extends Thread{
        public void run(){
            for (int i = 0; i < 100; i++) {
                System.out.println("上课");
            }
        }
    }
}
